inherited fEmpenhoConsulta: TfEmpenhoConsulta
  Left = 48
  Top = 49
  Width = 911
  Height = 599
  Caption = 'Consulta de Material nao Confirmado.'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited MMJPanel1: TMMJPanel
    Width = 903
    object Label1: TLabel
      Left = 8
      Top = 8
      Width = 37
      Height = 13
      Caption = 'Material'
      Transparent = True
    end
    object Label2: TLabel
      Left = 200
      Top = 8
      Width = 21
      Height = 13
      Caption = 'Lote'
      Transparent = True
    end
    object Label3: TLabel
      Left = 368
      Top = 8
      Width = 37
      Height = 13
      Caption = 'Produto'
      Transparent = True
    end
    object Label4: TLabel
      Left = 568
      Top = 8
      Width = 21
      Height = 13
      Caption = 'Tipo'
      Transparent = True
    end
    object edMaterial: TEdit
      Left = 56
      Top = 8
      Width = 121
      Height = 21
      TabOrder = 0
      OnKeyPress = edMaterialKeyPress
    end
    object edLote: TEdit
      Left = 224
      Top = 8
      Width = 121
      Height = 21
      TabOrder = 1
      OnKeyPress = edMaterialKeyPress
    end
    object edProduto: TEdit
      Left = 416
      Top = 8
      Width = 121
      Height = 21
      TabOrder = 2
      OnKeyPress = edMaterialKeyPress
    end
    object cbStatus: TComboBox
      Left = 640
      Top = 8
      Width = 249
      Height = 21
      ItemHeight = 13
      ItemIndex = 0
      TabOrder = 3
      Text = 'TODOS'
      OnKeyPress = edMaterialKeyPress
      Items.Strings = (
        'TODOS'
        'CONFIRMACAO DE RECEBIMENTO'
        'EMPENHO DE MATERIAIS NA O.F.')
    end
  end
  inherited MMJPanel2: TMMJPanel
    Top = 512
    Width = 903
    Height = 60
    object lblLog: TLabel [0]
      Left = 200
      Top = 16
      Width = 9
      Height = 13
      Caption = '...'
      Transparent = True
    end
    inherited btnGravar: TBitBtn
      Left = 639
      Top = 6
      Caption = 'Confirmar'
      Glyph.Data = {
        36080000424D3608000000000000360400002800000020000000200000000100
        08000000000000040000000000000000000000010000000000001C3404002434
        1C00242424001C3C0400243C0C00244404002C5C04003C5C240044543C005C5C
        54005C5C5C00646464006C6C6C0054743C007474740044840400747C74007C7C
        7C0084848400449404006C8C540054AC0400000000008C8C8C008C948C009494
        94009C9C9C00A4A4A400ACACAC00B4B4B4006CD404006CDC040074F404007CFC
        040084FC0C0084FC14007CDC24008CFC1C008CFC240094FC240094EC3C0094FC
        2C009CFC3C0094D45C009CF44C009CFC4400A4FC4C00A4FC5400ACFC6400B4FC
        6C00B4F47400BCF48400BCFC7C00B4C4A400ACCC9400BCCCAC00BCC4B400BCCC
        B400B4E48C00BCE49400BCDCA400C4F49400C4FC8C00C0C0C000002A3E00003F
        5D0000547C0000699B00007EBA000093D90000AAF00024B6FF0048C2FF006CCE
        FF0090DAFF00B4E6FF00003E3E00005D5D00007C7C00009B9B0000BABA0000D9
        D90000F0F00024FFFF0048FFFF006CFFFF0090FFFF00B4FFFF00003E2A00005D
        3F00007C5400009B690000BA7E0000D9930000F0AA0024FFB60048FFC2006CFF
        CE0090FFDA00B4FFE600003E1400005D1E00007C2800009B320000BA3C0000D9
        460000F0550024FF6D0048FF85006CFF9D0090FFB500B4FFCD00003E0000005D
        0000007C0000009B000000BA000000D9000000F0000024FF240048FF48006CFF
        6C0090FF9000B4FFB400143E00001E5D0000287C0000329B00003CBA000046D9
        000055F000006DFF240085FF48009DFF6C00B5FF9000CDFFB4002A3E00003F5D
        0000547C0000699B00007EBA000093D90000AAF00000B6FF2400C2FF4800CEFF
        6C00DAFF9000E6FFB4003E3E00005D5D00007C7C00009B9B0000BABA0000D9D9
        0000F0F00000FFFF2400FFFF4800FFFF6C00FFFF9000FFFFB4003E2A00005D3F
        00007C5400009B690000BA7E0000D9930000F0AA0000FFB62400FFC24800FFCE
        6C00FFDA9000FFE6B4003E1400005D1E00007C2800009B320000BA3C0000D946
        0000F0550000FF6D2400FF854800FF9D6C00FFB59000FFCDB4003E0000005D00
        00007C0000009B000000BA000000D9000000F0000000FF242400FF484800FF6C
        6C00FF909000FFB4B4003E0014005D001E007C0028009B003200BA003C00D900
        4600F0005500FF246D00FF488500FF6C9D00FF90B500FFB4CD003E002A005D00
        3F007C0054009B006900BA007E00D9009300F000AA00FF24B600FF48C200FF6C
        CE00FF90DA00FFB4E6003E003E005D005D007C007C009B009B00BA00BA00D900
        D900F000F000FF24FF00FF48FF00FF6CFF00FF90FF00FFB4FF002A003E003F00
        5D0054007C0069009B007E00BA009300D900AA00F000B624FF00C248FF00CE6C
        FF00DA90FF00E6B4FF0014003E001E005D0028007C0032009B003C00BA004600
        D9005500F0006D24FF008548FF009D6CFF00B590FF00CDB4FF003F3F3F3F3F3F
        3F3F3F3F191917171719193F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F
        3F3F17171212111111121219193F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F
        3F3F17171212111111121219193F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F
        3F1912120E0E0C0C0C0E0E12123F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F
        3F120E0E0C0C0B0B0B0C0C1111173F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F
        3F120E0E0C0C0B0B0B0C0C1111173F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F17
        17110C0C0B0B0A0A0A0B0B0E0E123F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F12
        12140707020201010B0B0B0C0C1117173F3F3F3F3F3F3F3F3F3F3F3F3F3F3F18
        181E1E1E0F0F0303100C0C0C0C0E121219193F3F3F3F3F3F3F3F3F3F3F3F3F18
        181E1E1E0F0F0303100C0C0C0C0E121219193F3F3F3F3F3F3F3F3F3F3F3F3F24
        242223231F1F0606080C0C0C0C0C111117173F3F3F3F3F3F3F3F3F3F3F2B2B21
        21222323222213130517170C0C0C0E0E1111173F3F3F3F3F3F3F3F3F3F2B2B21
        21222323222213130517170C0C0C0E0E1111173F3F3F3F3F3F3F3F3F35212122
        2223232323231E1E0609090E0E0C0C0C0E0E1219193F3F3F3F3F3F3F2B222223
        232727272626222213040418180E0C0C0C0C0E12123F3F3F3F3F3F3F29262625
        252A2F2F2F2F26261F06060808110E0E0C0C0E111117173F3F3F3F3F29262625
        252A2F2F2F2F26261F06060808110E0E0C0C0E111117173F3F3F3838302D2D23
        232C393933332E2E23151503031111110E0E0C0E0E1111173F3F3F3F392E2E28
        28383F3F373731312A22220F0F01171711110E0E0E0E0E1219193F3F3F37373F
        3F3F3F3F3F3F3A3A3026261E1E0609091717110E0E0E0E1117173F3F3F37373F
        3F3F3F3F3F3F3A3A3026261E1E0609091717110E0E0E0E1117173F3F3F3F3F3F
        3F3F3F3F3F3F3F3F322E2E23231503030C0C17121211111217173F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3734342D2D231313000018191917171719193F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3734342D2D231313000018191917171719193F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3B3B34342E232313130019193F3F3F3F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3C3C33303023230F01011D1D3F3F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F393E3E3131250F0F0D0D3F3F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F393E3E3131250F0F0D0D3F3F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F3F38383D3D3123232020353F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3C2A2A2323363F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3C2A2A2323363F3F3F3F3F3F3F3F
        3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F37373F3F3F}
    end
    inherited btnIncluir: TBitBtn
      Left = 15
      Visible = False
    end
    inherited btnCancelar: TBitBtn
      Left = 74
      Visible = False
    end
    inherited btnExcluir: TBitBtn
      Left = 26
      Visible = False
    end
    inherited btnProcurar: TBitBtn
      Left = 524
      Top = 6
      Caption = 'Procura'
      OnClick = btnProcurarClick
    end
    inherited btnSair: TBitBtn
      Left = 757
      Top = 6
    end
  end
  object gridOf: TJvDBGrid [2]
    Left = 0
    Top = 51
    Width = 903
    Height = 461
    Align = alClient
    DataSource = dsEmp
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
    TabOrder = 2
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    AlternateRowFontColor = clBlue
    AutoSizeColumns = True
    SelectColumnsDialogStrings.Caption = 'Select columns'
    SelectColumnsDialogStrings.OK = '&OK'
    SelectColumnsDialogStrings.NoSelectionWarning = 'At least one column must be visible!'
    EditControls = <>
    RowsHeight = 17
    TitleRowHeight = 17
    Columns = <
      item
        Expanded = False
        FieldName = 'TIPO'
        Width = 123
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'ETIQUETA'
        Width = 83
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'LOTE'
        Width = 56
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'COMPONENTE'
        Width = 70
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'DESCRICAO_COMPONENTE'
        Width = 137
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'PRODUTO_DESTINO'
        Width = 89
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'DESCRICAO_PRODUTO'
        Width = 169
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'TIPO_DOC'
        Width = 30
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'OFDET_NF'
        Width = 62
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'QTDE'
        Width = 58
        Visible = True
      end>
  end
  object sqlEmp: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQL.Strings = (
      'SELECT * FROM'
      '   ('
      
        '     SELECT '#39'CONFIRMACAO DE RECEBIMENTO'#39' TIPO, EOF_CODETI ETIQUE' +
        'TA, ETI_LOTE LOTE, EOF_CDCOMP COMPONENTE, A.PRO_DESCRI DESCRICAO' +
        '_COMPONENTE, EOF_CODPRO PRODUTO_DESTINO, '
      
        '       B.PRO_DESCRI DESCRICAO_PRODUTO , DECODE(ETI_COMP19,NULL,'#39 +
        'NF'#39','#39'OF'#39') TIPO_DOC, NVL(ETI_COMP19,ETI_NTFISC) OFDet_NF, '
      '       ETI_QTDENV QTDE '
      '     FROM ATS_ETIQOF, F_ETIQUETAS, F_PRODS A, F_PRODS B'
      '     WHERE EOF_CODETI = ETI_CODETI'
      '     AND   A.PRO_CODPRO = EOF_CDCOMP'
      '     AND   B.PRO_CODPRO = EOF_CODPRO'
      '     AND   ETI_EATIVA = 1'
      '     AND   EOF_STATUS NOT IN (0,3) '
      '     UNION ALL'
      
        '     SELECT '#39'EMPENHO DE MATERIAIS NA O.F.'#39' TIPO,ETI_CODETI, ETI_' +
        'LOTE LOTE, ETI_CODPRO COMPONENTE, A.PRO_DESCRI DESCRICAO_COMPONE' +
        'NTE, B.PRO_CODPRO PRODUTO_DESTINO, '
      
        '       B.PRO_DESCRI DESCRICAO_PRODUTO , DECODE(ETI_COMP19,NULL,'#39 +
        'NF'#39','#39'OF'#39') TIPO_DOC, NVL(ETI_COMP19,ETI_NTFISC) OFDet_NF, '
      '       ETI_QTDENV QTDE '
      '     FROM F_ETIQUETAS, F_PRODS A, F_PRODS B'
      '     WHERE A.PRO_CODPRO = ETI_CODPRO'
      '     AND   '#39'A DISTRIBUIR'#39' = B.PRO_CODPRO'
      '     AND   ETI_EATIVA=1'
      '     AND   ETI_LOCEST = '#39'PROC'#39
      '     AND   NOT EXISTS'
      '     ('
      '       SELECT 1 FROM ATS_ETIQOF'
      '       WHERE EOF_CODETI = ETI_CODETI'
      '     ))')
    SQLConnection = dm.SQLConnection1
    Left = 208
    Top = 16
  end
  object dspEmp: TDataSetProvider
    DataSet = sqlEmp
    Options = [poAllowCommandText]
    Left = 248
    Top = 16
  end
  object cdsEmp: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspEmp'
    Left = 288
    Top = 16
    object cdsEmpTIPO: TStringField
      FieldName = 'TIPO'
      Size = 28
    end
    object cdsEmpETIQUETA: TStringField
      FieldName = 'ETIQUETA'
      Size = 10
    end
    object cdsEmpLOTE: TFMTBCDField
      FieldName = 'LOTE'
      Precision = 32
      Size = 8
    end
    object cdsEmpCOMPONENTE: TStringField
      FieldName = 'COMPONENTE'
      Size = 26
    end
    object cdsEmpDESCRICAO_COMPONENTE: TStringField
      FieldName = 'DESCRICAO_COMPONENTE'
      Size = 100
    end
    object cdsEmpPRODUTO_DESTINO: TStringField
      FieldName = 'PRODUTO_DESTINO'
      Size = 26
    end
    object cdsEmpDESCRICAO_PRODUTO: TStringField
      FieldName = 'DESCRICAO_PRODUTO'
      Size = 100
    end
    object cdsEmpTIPO_DOC: TStringField
      FieldName = 'TIPO_DOC'
      Size = 2
    end
    object cdsEmpQTDE: TFMTBCDField
      FieldName = 'QTDE'
      Precision = 32
      Size = 8
    end
    object cdsEmpOFDET_NF: TStringField
      FieldName = 'OFDET_NF'
      Size = 80
    end
  end
  object dsEmp: TDataSource
    DataSet = cdsEmp
    Left = 328
    Top = 16
  end
  object sspConfirma: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'CODETI'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'USUARIO'
        ParamType = ptInput
      end>
    SQLConnection = dm.SQLConnection1
    StoredProcName = 'ATS_EMPENHA_MAT_OF'
    Left = 392
    Top = 40
  end
end
